using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

public class DBTextBox : TextBox
{
    public DBTextBox(DGVTextBoxColumn Creator)
        : base()
    {
        switch (Creator.Style)
        {
            case DGVTextBoxColumnStyle.ID:
                this.ReadOnly = true;
                break;
            case DGVTextBoxColumnStyle.Description:
                this.Multiline = true;
                this.Dock = DockStyle.Fill;
                break;
        }

        this.DataBindings.Add(new Binding("Text", Creator.DataGridView.DataSource, Creator.DataPropertyName, true));
    }
}
